/**
 * 
 */
package com.wolfpire.info.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.wolfpire.info.dao.SocialSerCountInfoDao;
import com.wolfpire.info.model.SocialSerCountInfo;
import com.wolfpire.info.service.SocialSerCountInfoService;
import com.wolfpire.system.common.Constants;
import com.wolfpire.system.common.Page;
import com.wolfpire.system.common.base.dao.IBaseHibernateDao;
import com.wolfpire.system.common.base.service.impl.BaseHibernateService;

/**
 * @author lihd
 *
 */

@Service("socialSerCountInfoService")
public class SocialSerCountInfoServiceImpl extends
		BaseHibernateService<SocialSerCountInfo, Long> implements
		SocialSerCountInfoService {

	@Override
	public List<SocialSerCountInfo> list(SocialSerCountInfo socialSerCountInfo) {
		return this.socialSerCountInfoDao.list(socialSerCountInfo);
	}

	@Override
	public void del(Long id) {
		SocialSerCountInfo socialSerCountInfo = this.socialSerCountInfoDao.get(id);
		if (null != socialSerCountInfo) {
			socialSerCountInfo.setDelFlag(Constants.DELETE_FLAG);
			this.socialSerCountInfoDao.saveOrUpdate(socialSerCountInfo);
		}
	}

	@Override
	public Page<SocialSerCountInfo> setPageDataList(
			Page<SocialSerCountInfo> page,
			SocialSerCountInfo filterSocialSerCountInfo) {
		return this.socialSerCountInfoDao.findSocialSerCountInfos(page, filterSocialSerCountInfo);
	}

	@Override
	protected IBaseHibernateDao<SocialSerCountInfo, Long> getEntityDao() {
		return this.socialSerCountInfoDao;
	}
	
	@Resource private SocialSerCountInfoDao socialSerCountInfoDao;
}
